Objects Reference

vector::cross

Prototype

inline void cross(vector& v1,vector& v2)

Parameters

Parameter Type Description
v1 vector& First vector for cross product.
v2 vector& Second vector for cross product.

Return Value

None

Remarks

Sets the vector to the cross product of two specified vectors.
x = v1.y*v2.z - v1.z*v2.y;
y = v1.z*v2.x - v1.x*v2.z;
z = v1.x*v2.y - v1.y*v2.x;